package com.zshy.base.core.contract.constant;

import lombok.experimental.UtilityClass;

/**
 * 媒体类型工具类
 *
 * @author zhouhengzhe
 */
@UtilityClass
public class MimeTypeConstants {

    public final String IMAGE_PNG = "image/png";

    public final String IMAGE_JPG = "image/jpg";

    public final String IMAGE_JPEG = "image/jpeg";

    public final String IMAGE_BMP = "image/bmp";

    public final String IMAGE_GIF = "image/gif";

    public final String IMAGE_WEBP = "image/webp";

    /**
     * 图片常量
     */
    public final String[] IMAGE_EXTENSION = {"bmp", "gif", "jpg", "jpeg", "png"};

    /**
     * flash常量
     */
    public final String[] FLASH_EXTENSION = {"swf", "flv"};

    /**
     * 音视频常量
     */
    public final String[] MEDIA_EXTENSION = {"swf", "flv", "mp3", "wav", "wma", "wmv", "mid", "avi", "mpg",
            "asf", "rm", "rmvb"};

    /**
     * 视频常量
     */
    public final String[] VIDEO_EXTENSION = {"mp4", "avi", "rmvb"};

    public final String[] DEFAULT_ALLOWED_EXTENSION = {
            // 图片
            "bmp", "gif", "jpg", "jpeg", "png",
            // word excel powerpoint
            "doc", "docx", "xls", "xlsx", "ppt", "pptx", "html", "htm", "txt",
            // 压缩文件
            "rar", "zip", "gz", "bz2",
            // 视频格式
            "mp4", "avi", "rmvb",
            // pdf
            "pdf"};
}
